{layout name="layouts/admin" /}
<div class="panel-heading">微信群列表
   <a style="float:right;margin-top:-6px;" href="/wechatgroup/groupadd" class="btn btn-primary">添加微信群</a>
</div>

<div class="panel-body">
    <div class="box-body">
        <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
            <div class="row">
                <form action="/wechatgroup/wechatlist" method="post" style="margin-bottom: 20px;">
                    <input type="text" class="form-control" style="width:250px;" value="{$keywords}" id="keywords" name="keywords" placeholder="请输入群名称"/>
                    <select class="form-control" name="datatype">
                        <option value="0" {$datatype==0?"selected":""}>医者会</option>
                        <option value="1" {$datatype==1?"selected":""}>患者会</option>
                    </select>
                    <input type="submit" value="搜索" class="btn btn-primary"/>
                </form>
                <div class="col-sm-12">
                    <table class="table table-hover dataTable" >
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>群名称</th>
                            <th>科室</th>
                            <th>省份</th>
                            <th>是否热门</th>
                            <th>群类型</th>
                            <th>群码是否过期</th>
                            <th>群码扫码次数</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach $groupdata as $item}
                        <tr>
                            <td  style="width:5%">{$item.id}</td>
                            <td style="width:10%">{$item.group_name}</td>
                            <td style="width:10%">{$item.dep_name}</td>
                            <td style="width:10%">{$item.prov_name}</td>
                            <td style="width:9%">{$item.is_hot==0?'否':'是'}</td>
                            <td style="width:10%">{$item.data_type==0?'医生群':'患者群'}</td>
                            <td style="width:18%;{$item.is_overdue==0?'':'color:red;font-weight: bold;font-size:20px;'}">{$item.is_overdue==0?'否':'该换二维码啦!!!'}</td>
                            <td style="width:12%">{$item.scan_num}</td>
                            <td style="width:10%">
                                <a href="/wechatgroup/groupadd/{$item.id}"><i class="fa fa-pencil fa-fw" style="font-size: 20px;" title="编辑"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                                <a href="/wechatgroup/groupdel/{$item.id}" onclick="return confirm('确定要删除该微信群么？请慎重操作!!!')"><i class="fa fa-trash-o fa-lg" style="font-size: 20px;" title="删除"></i></a>
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <div class="col-sm-7" style="float: right">
                        {php}echo trim($groupdata->render(),'"');{/php}
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-9 ">
                    {$groupdata[0]?"":"暂无数据"}
                </div>

            </div>
        </div>
    </div>

</div>

<script>
    function prizeexort() {
        var keyword=$("#keywords").val();
        var prizesource=$("#prizesource").val();
        var prizeisopen=$("#prizeisopen").val();
        window.location.href="/prize/prizeexport?keyword="+keyword+"&prizesource="+prizesource+"&prizeisopen="+prizeisopen;
    }
</script>